package com.huatai.bpmn.service;

import com.huatai.bpmn.entity.RoleEntity;
import com.huatai.bpmn.entity.UserEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huatai.bpmn.entity.UserRoleEntity;
import com.huatai.bpmn.entity.dto.PageDto;
import com.huatai.bpmn.entity.vo.UserRoleVo;
import com.huatai.common.api.R;

import java.util.List;
import java.util.Map;

/**
* @author 聂贞吉
* @description 针对表【tb_user】的数据库操作Service
* @createDate 2023-07-12 13:47:44
*/
public interface UserService extends IService<UserEntity> {

	R<String> addUser(UserEntity userEntity);

	R<String> addRole(RoleEntity roleEntity);

	R<Map<String, Object>> getUserList(PageDto pageDto);

	R<Map<String, Object>> getRoleList(PageDto pageDto);

	R<String> addUserRolesMapping(String userId, String[] roleIds);

    R<String> removeUserRoleMapping(String userId, String roleId);

	R<List<UserRoleVo>> findUserRoleList(String userId);

    Boolean syncUsersInfonfo();

	R<String> updateRoleName(RoleEntity roleEntity);

	Boolean syncUsersInfoByWeChat();
}
